#include "ti_msp_dl_config.h"
#include "jy61P.h"
#include "usart3.h"


void jy61p_Init(void)
{
//	NVIC_ClearPendingIRQ(UART3_INST_INT_IRQN);
	
	DL_UART_clearInterruptStatus(UART3,DL_UART_INTERRUPT_RX);//清除中断标志位
    
    NVIC_EnableIRQ(UART3_INST_INT_IRQN);

}

//void UART3_IRQHandler(void)
//{
//	uint8_t RxData = DL_UART_Main_receiveData(UART3);
//	jy61p_ReceiveData(RxData);
//	
//}

void UART3_INST_IRQHandler(void)
{
    uint8_t RxData;
    switch( DL_UART_getPendingInterrupt(UART3_INST) )
	{
		case DL_UART_IIDX_RX://如果是接收中断
        RxData = DL_UART_Main_receiveData(UART3);
        jy61p_ReceiveData(RxData);
        
        break;
        default://其他的串口中断
			break;
	}
}
